<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;  //应用的地址名
String listActionName = basePath+"/yw/leaveflow/OaLeaveAll.action?op=searchjs";
//basePath+"/pub/process/processTask_toTask.action";
%>
<script language="javascript" src="<%=path %>/js/My97/WdatePicker.js"></script>
<script type="text/javascript">
    		$(function(){
			//表格初始化
			$('#searchTable').grid({
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
				queryParams:{},  //用于查询的参数以及初始值
				//表头列，不建议改动
				frozenColumns:[[   
	                {field:'ck',checkbox:true}
				]],
				//数据列，根据显示的内容进行修改
				columns:[[  
                        {   field:'leaveType',
                        	title:'假种',
                        	width:120,
                        	sortable:true
                        },
						{   field:'userName',
                        	title:'申请人',
                        	width:120,
                        	sortable:true},
						{   field:'applyTime',
							title:'申请时间',
							width:120,
							sortable:true
						},
						{   field:'startTime',
							title:'开始时间',
							width:120,
							sortable:true},
						{   field:'endTime',
							title:'结束时间',
							width:120,
							sortable:true},
						{   field:'reason',
							title:'请假事由',
							width:240
						},
						{   field:'statusInfo',
							title:'状态',
							width:120
						}
				]],
				//功能按钮组
                toolbar:[<ce:jsonBtn/>]
			});
			//查询操作
			$('#search').click(function(){
                defaultSearchAction();
            });		
		});	
		
	
		function monitorRow(){
			var rows = $('#searchTable').datagrid('getSelections');					
    		if (rows.length>0){
    			  if(rows.length>1){
    				  $.messager.alert('消息提示','请选择单条请假申请！','error'); 
    			  }
    			  var butParam={but:[{id:'closeBtn',name:'关闭',classname:'icon-undo'}]};
    			  defaultOpenWindow('','流程监控',800,500,{processInstanceId:rows[0].processInstanceId},null,butParam);
    	
    		}else{
    		   $.messager.alert('消息提示','请选择请假申请','error');
    		}
		}
	
    function saveAsExcel(){
    	
    }
    </script>
<html>
  <head>
    <base href="<%=basePath%>"></base>
    <title><%=com.ce.util.RegeditUtil.getRegeditStringValue("SYSTEM_SEG_NAME") %></title>
  </head> 
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr height="30">
    <td>
    <div id="searchDiv" class="searchDiv">
     <div id="searchLeft" style=" width:85%; float:left">
       <div id="searchWrite"  class="searchWrite">
                 名称：<input type="text" id="names" name="names">
       </div>
       <div id="searchAuto" class="searchAuto" style="display:none">  
       </div>
     </div>
     <div id="searchRight" class="searchRight" style="padding-top:1px">
      <a id="search"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
     </div>
   </div>
    </td>
  </tr>
  <tr>
    <td colspan="2"><div id="searchTable"></div></td>
  </tr>
</table>
</body>
</html>
   
   

